package com.ys.web.entity;
// Generated 2017-3-7 9:21:28 by Hibernate Tools 4.0.0

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 推广单元
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "promotion_unit", catalog = "ysanalyze")
public class PromotionUnit implements java.io.Serializable {

	private Integer id;
//	/**推广计划id*/
//	private int promotionPlanId;
	/**推广单元名称*/
	private String unitName;
	/**当前单元的添加状态(0：未添加，1：已添加)*/
	private byte addSate;
	/**推广单元是否被删除(0：未删除，1：已删除)*/
	private byte ifDelete;

	public PromotionUnit() {
	}

	public PromotionUnit( String unitName, byte addSate, byte ifDelete) {
//		this.promotionPlanId = promotionPlanId; int promotionPlanId,
		this.unitName = unitName;
		this.addSate = addSate;
		this.ifDelete = ifDelete;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

//	@Column(name = "promotion_plan_id", nullable = false)
//	public int getPromotionPlanId() {
//		return this.promotionPlanId;
//	}
//
//	public void setPromotionPlanId(int promotionPlanId) {
//		this.promotionPlanId = promotionPlanId;
//	}

	@Column(name = "unit_name", nullable = false, length = 50)
	public String getUnitName() {
		return this.unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}
	
//		nullable = false
	@Column(name = "add_sate")
	public byte getAddSate() {
		return this.addSate;
	}

	public void setAddSate(byte addSate) {
		this.addSate = addSate;
	}

	@Column(name = "if_delete")
	public byte getIfDelete() {
		return this.ifDelete;
	}

	public void setIfDelete(byte ifDelete) {
		this.ifDelete = ifDelete;
	}

}
